<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>退货申请-{{$SEO['title']}}</title>
    <meta name="keywords" content="{{$SEO['keywords']}}"/>
    <meta name="description" content="{{$SEO['description']}}"/>

    <!--公用css引用-->
    @include('front.common.style')
            <!--END/公用css引用-->
    <link rel="stylesheet" href="{{ URL::asset('/') }}css/userCenter.css">
</head>
<body>
@inject('pictureService','App\Interfaces\PictureService')

<!--公共头部-->
@include('front.common.header')
        <!--END/公共头部-->

<div class="inbox user-center">
    <div class="layout-margin unend">
        <div class="sidebar-end"></div>
        <div class="sidebar-start">
            @include('front.common.leftnav')
        </div>

        <!--主体部分-->
        <div class="container">
            <div class="container-inner u-order order-comment">
                <div class="ui-brd-box1-">
                    <div class="tit-2 tit-skin-2">
                        <span class="h">申请售后</span>
                    </div>

                    <div class="order-list order-list-big">
                        <table class="bl-table bl-table-tdLi table-tc ui-brd-box1">
                            <tr>
                                <th colspan="2">商品名称</th>
                                <th>包装清单</th>
                                <th>赠品清单</th>
                                <th>价格</th>
                                <th>数量</th>
                            </tr>
                            @if($order_goods)
                            <tr>
                                <td class="pic tl">
                                    <a href="{{route('front.goods.detail',[$order_goods->goods_id])}}" title="{{$order_goods->goods_name}}">
                                        <img class="head-img" src="{{$pictureService::thumb($order_goods->goods_thumb, 70, 70)}}" alt="{{$order_goods->goods_name}}">
                                    </a>
                                </td>
                                <td class="tl">
                                    <p class="name fn-mb10"><a class="link" href="{{route('front.goods.detail',[$order_goods->goods_id])}}" title="{{$order_goods->goods_name}}">{{$order_goods->goods_name}}</a></p>
                                    <p class="text-color-7">购买时间：{{date('Y-m-d', $order_goods->add_time)}}<span class="fn-mr10"></span> {{date('H:i:s', $order_goods->add_time)}}</p>
                                </td>
                                <td>-</td>
                                <td>-</td>
                                <td>{{$order_goods->shop_price}}</td>
                                <td>{{$order_goods->buy_number}}</td>
                            </tr>
                                @endif
                        </table>

                        <div class="fn-ml10 fn-mr10 fn-mt20">
                            <span class="text-color-error">* 温馨提示：</span> 本次售后服务将由 <a href="" class="text-color-error">阿福易购</a> 为您提供

                            <div class="fn-dib hover-show-tip fn-rel fn-fr">
                                <i class="icon icon-qq-blue-sm fn-mr4" style="margin-top: -3px;"></i>
                                联系客服
                                <div class="bl-tip-box tip-skin-gray" style="left: -59px;top:24px;width:120px; ">
                                    <div class="mask-T"></div>
                                    <div class="J-box TJ-box" style="left: 50%;"><span class="J"></span><i class="J"></i></div>
                                    <div class="bl-tip-con">
                                        <ul>
                                            <li>
                                                <a class="js-qq" data-qq="3039215126" href="http://wpa.qq.com/msgrd?v=3&amp;uin=3039215126&amp;site=qq&amp;menu=yes" target="_blank" title="在线"><i class="icon fn-mr4 icon-qq-gray-sm" style="margin-top: -3px;"></i>客服-小阿</a>
                                            </li>
                                            <li>
                                                <a class="js-qq" data-qq="1378461406" href="http://wpa.qq.com/msgrd?v=3&amp;uin=1378461406&amp;site=qq&amp;menu=yes" target="_blank" title="在线"><i class="icon fn-mr4 icon-qq-gray-sm" style="margin-top: -3px;"></i>客服-小福</a>
                                            </li>
                                            <li>
                                                <a class="js-qq" data-qq="2151543159" href="http://wpa.qq.com/msgrd?v=3&amp;uin=2151543159&amp;site=qq&amp;menu=yes" target="_blank" title="离线"><i class="icon icon-qq-gray-sm fn-mr4" style="margin-top: -3px;"></i>客服-小易</a>
                                            </li>
                                            <li>
                                                <a class="js-qq" data-qq="3082657948" href="http://wpa.qq.com/msgrd?v=3&amp;uin=3082657948&amp;site=qq&amp;menu=yes" target="_blank" title="离线"><i class="icon icon-qq-gray-sm fn-mr4" style="margin-top: -3px;"></i>客服-小塔</a>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </div>

                        </div>

                        <div class="return-goods fn-mt20">


                            {{-- {!! Form::model($orders,['route'=>'my.refund.create','method' => 'get','class'=>'js-form bl-form bl-formhor','novalidate'=>'novalidate']) !!} --}}
                            {!! Form::model($orders,['url'=>'my/refund/create','method' => 'get','class'=>'js-form bl-form bl-formhor','novalidate'=>'novalidate']) !!}
                            {!! Form::hidden('order_sn',$orders->order_sn,array('class'=>'form-control','placeholder'=>'订单编号'))!!}
                            {!! Form::hidden('goods_id',$order_goods->goods_id,array('class'=>'form-control','placeholder'=>'商品id'))!!}

                                <!--信息提交-->
                                <ul class="ul-group">

                                    <li class="bl-form-group @if($errors->has('after_sales_type')) has-error   @endif">
                                        <label><em class="text-color-6">*</em>服务类型：</label>
                                        <div class="controls">
                                            <div class="fn-dib fn-mt6">

                                                {!! Form::select('after_sales_type',$afterSalesTypeArr,1,['class'=>'form-control','placeholder'=>'售后类型','required'=>'required','tabindex'=>'-1'])!!}

                                                @if($errors->has('after_sales_type'))
                                                    <label class="control-label" for="inputError"><i class="fa fa-times-circle-o"></i> {{$errors->first('after_sales_type')}}</label>
                                                @endif
                                            </div>
                                        </div>
                                    </li>
                                    <li class="bl-form-group @if($errors->has('after_sales_number')) has-error   @endif">
                                        <label><em class="text-color-6">*</em>提交数量：</label>
                                        <div class="controls">
                                            <div class="form-dominput">1</div>
                                            {!! Form::hidden('after_sales_number',1,array('class'=>'form-control','placeholder'=>'售后数量','required'=>'true','data-msg-required'=>'数量不能为空'))!!}

                                            @if($errors->has('after_sales_number'))
                                                <label class="control-label" for="inputError"><i class="fa fa-times-circle-o"></i> {{$errors->first('after_sales_number')}}</label>
                                            @endif
                                        </div>

                                    </li>
                                    <li class="bl-form-group form-group @if($errors->has('reason'))has-error @endif">
                                        <label><em class="text-color-6">*</em>原因：</label>
                                        <div class="controls">
                                            {!! Form::textarea('reason',old('reason'),array('class'=>'form-textarea','style'=>'width: 600px;','placeholder'=>'最多255字','maxlength'=>'255','placeholder'=>'退货原因,最多255字','required'=>'true','data-msg-required'=>'原因不能为空'))!!}

                                            @if($errors->has('reason'))
                                                <label class="control-label" for="inputError" style="color: #dd4b39;"><i class="fa fa-times-circle-o"></i> {{$errors->first('reason')}}</label>
                                            @endif
                                        </div>
                                    </li>

                                    <hr class="fn-mb10">
                                    <li class="fn-mb10"><strong class="fn-ml10">确认信息</strong></li>

                                    <li class="bl-form-group @if($errors->has('consignee')) has-error @endif">
                                        <label><em class="text-color-6">*</em>客户姓名：</label>
                                        <div class="controls col-sm-3">
                                            {!! Form::text('consignee',old('consignee'),array('class'=>'fn-tinput form-control','placeholder'=>'客户姓名','required'=>'true','data-msg-required'=>'姓名不能为空'))!!}

                                            @if($errors->has('consignee'))
                                                <label class="control-label" for="inputError" style="color: #dd4b39;"><i class="fa fa-times-circle-o"></i> {{$errors->first('consignee')}}</label>
                                            @endif
                                        </div>
                                    </li>

                                    <li class="bl-form-group @if($errors->has('phone')) has-error @endif">

                                        <label><em class="text-color-6">*</em>手机号码：</label>
                                        <div class="controls col-sm-3">
                                            {!! Form::text('phone',$orders->mobile,array('class'=>'fn-tinput form-control', 'readonly'=>'readonly','placeholder'=>'手机号码','style'=>'background-color:#eee'))!!}

                                            @if($errors->has('phone'))
                                                <label class="control-label" for="inputError" style="color: #dd4b39;"><i class="fa fa-times-circle-o"></i> {{$errors->first('phone')}}</label>
                                            @endif
                                        </div>
                                    </li>

                                    <li class="bl-form-group bl-form-btns">
                                        <label class="fn-vhide">提交：</label>
                                        <div class="controls">
                                            <button class="fn-btn btn-primary fn-mr8 btn-save" type="submit">提交</button>
                                        </div>
                                    </li>
                                </ul>

                            {!! Form::hidden('_method', 'get') !!}
                            {!! Form::close() !!}

                        </div>

                    </div>
                </div>


            </div>

        </div>
        <!--END/主体部分-->

    </div>
</div>

<!--公共尾部-->
@include('front.common.footer')
        <!--END/公共尾部-->

<!--公用js引用-->
@include('front.common.script')
<script src="{{ asset('/dist/js/jquery.validation.js')}}"></script>
<!--END/公用js引用-->
<script type="text/javascript">

        var jform=$('.js-form');
        jform.validate({
            submitHandler:function(form){
                 $.ajax({
                    type: "GET",
                    url: jform.attr('action'),
                    data: jform.serialize(),
                    dataType: "json",
                    success: function (res) {
                        if(res.status){
                            window.location.href='/'+res.data;
                        }

                    }
                }); //end ajax

            }
        });

    var qqNum="";
    $(".js-qq").each(function(index,e){
        var qq=$(e).data("qq");
        qqNum+=qq+":";
    });
    //动态创建javascript跨域获取QQ在线状态
    var online = [];
    var url="http://webpresence.qq.com/getonline?Type=1&"+qqNum;
    $.getScript(url)
            .done(function() {
                //scrpit加载完成后执行在线状态图片的改写

                $(".js-qq").each(function(index,e){
                    if(online[index]=="1"){
                        $(e).find(".icon").addClass('icon-qq-blue-sm').removeClass('icon-qq-gray-sm');
                        $(e).attr('title','在线');
                    }
                });
            });
</script>
</body>
</html>